import { createStyleMixin } from '../../mixin'

let styleMixin  = createStyleMixin(['close'])

export let MyFieldVue = {
  mixins: [
    styleMixin
  ],
  template: `<div class="ui-relative u-field"><slot></slot><div
  class="ui-absolute u-field-close" @click="clearValue"
  :style="getCloseStyle()"
  ></div></div>`,
  data() {
    return {}
  },
  methods: {
    clearValue() {
      // document.getElementById(this.$el.dataset.for).value = ''
      this.$emit('clear')
    }
  }
}
